home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $Filename: VisualArts.h $
- ** $Includes, V1.1 $
- ** $Date: 94/07/01 $
- **
- **
- ** (C) 1994 Danny Y. Wong
- ** All Rights Reserved
- **
- ** DO NOT MODIFY
- */
-
- #include <exec/types.h>
- #include <exec/memory.h>
- #include <exec/lists.h>
- #include <exec/nodes.h>
- #include <intuition/intuition.h>
- #include <intuition/intuitionbase.h>
- #include <intuition/gadgetclass.h>
- #include <intuition/classes.h>
- #include <graphics/displayinfo.h>
- #include <graphics/gfxbase.h>
- #include <graphics/gfxmacros.h>
- #include <libraries/gadtools.h>
- #include <libraries/dos.h>
- #include <workbench/workbench.h>
- #include <workbench/startup.h>
-
- #include <clib/wb_protos.h>
- #include <clib/exec_protos.h>
- #include <clib/intuition_protos.h>
- #include <clib/gadtools_protos.h>
- #include <clib/graphics_protos.h>
- #include <clib/utility_protos.h>
- #include <clib/alib_protos.h>
- #include <clib/dos_protos.h>
-
- #include "string.h"
- #include "stdio.h"
- #include "stdlib.h"
- #include "PopUpMenuClass.h"
-
- /* macros for easy access to Gadget data */
-
- #define GetString(gad) (((struct StringInfo *)gad->SpecialInfo)->Buffer)
- #define GetUndoString(gad) (((struct StringInfo *)gad->SpecialInfo)->UndoBuffer)
- #define GetNumber(gad) (((struct StringInfo *)gad->SpecialInfo)->LongInt)
-
- /* List node name. Each node have the following */
-
- struct NameNode
- {
- struct Node nn_Node; //linked list node to previous or next node
- UBYTE nn_Data[255]; //name of the node, this is the same as
- //nn_Node.ln_Name
- };
-
- /* Visual Arts message object. Every GADGETUP event, the object is
- sent to the attached function. For Menus, the va_Gadget field is
- always NULL.
- */
-
- struct VAobject {
- struct Window *va_Window; //window the object originated
- struct Gadget *va_Gadget; //the gadget that sent this object
- struct IntuiMessage *va_IntuiMsg; //the IntuiMessage
- ULONG va_Flags; //user flags
- APTR va_UserData; //user data, function pointer etc..
- };
-
- /* Every AREXX command have the following */
-
- struct rexxCommandList
- {
- char *name; //name of the AREXX command, note its case sensitive
- APTR userdata; //user data, in this case it's a function pointer
- };
-
- /* Structure for Multi-Processing windows. This structure is a linked
- List for every window opened as Multi-Processing
- */
-
- struct WindowNode
- {
- struct Node nn_Node; //linked list to prev or next window
- UBYTE nn_Data[80]; //window name
- struct Window *nn_Window; //window pointer
- struct AppWindow *nn_AppWindow; //AppWindow pointer if window is a AppWindow
- struct MsgPort *nn_AppWindPort; //AppWindow Port
- short ID; //WindowNode ID
- APTR UserData; //window Handler for this window
- };
-
- /* Visual Arts function prototypes. All are in the VisualArts.lib
- */
-
- extern void DrawBox(struct Window *Wind, int Left, int Top, int Wid, int Hi, UBYTE APen, short Pattern );
- extern void DrawFBox(struct Window *Wind, int Left, int Top, int Wid, int Hi, UBYTE APen, short Pattern, UBYTE Outline, short Fill );
- extern void DrawLine(struct Window *Wind, int Left, int Top, int Wid, int Hi, UBYTE APen, short Pattern );
- extern void DrawNCircle(struct Window *Wind, int Left, int Top, int Right, int Bottom, UBYTE APen);
- extern void DrawFCircle(struct Window *Wind, int Left, int Top, int Right, int Bottom, UBYTE APen, short Pattern, UBYTE Outline, short Fill );
- extern void SetRPortFill(struct Window *Wind, short Type);
- extern void ButtonSelected(struct Window *wind, struct Gadget *gad);
- extern int AddNewNode(struct List *list, char name[255]);
- extern int DeleteNewNode(struct List *list, char name[255]);
- extern struct List *GetNewList(void);
- extern struct NameNode *FindNodeName(struct List *list, char name[255]);
- extern void FreeList(struct List *list);
- extern APTR VisualInfo;
- extern struct Screen *Scr;
- extern struct WindowNode *AddWindowNode(struct List *list, char name[80], APTR handler);
- extern int DelWindowNode(struct List *list, char name[80]);
- extern struct WindowNode *FindWindowNode(struct List *list, char name[80]);
- extern void FreeWindowList(struct List *list);
- extern void ReMakeWindowID(struct List *list);
- extern void closeRexxPort(void);
- extern void handlerRexxPort(void);
- extern struct RexxMsg *asyncRexxCmd(char *s);
- extern void replyRexxCmd(register struct RexxMsg *msg, register long primary,
- register long secondary, register char *string);
- extern long InitRexxPort(char *s, struct rexxCommandList *rcl,
- char *exten, int (*uf)());
- extern int dispatchRexx(register struct RexxMsg *msg, register struct rexxCommandList *dat, char *p);
-
-